<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<TITLE> <? echo $title;?> </TITLE>
<base href="<?php echo base_url() ?>" />
<LINK href="images/default_1.css" type="text/css" rel=stylesheet>
<SCRIPT src="js/jquery.min.js" type="text/javascript"></SCRIPT>
<script src="js/jquery.form.js" type="text/javascript"></script>
<script type="text/javascript">
  function save(){
     var formdata=$("#myform").formSerialize();//对表单进行初如化
     var data_url= '<?php echo site_url("main/savereq_gd") ?>';
     $('#msgs').html("<img src=\"images/loading.gif\" /><span class=\"about_content_title\"> 正在保存，请稍候。。。</span>");
     $(":input") .attr('disabled', true);
     $.ajax({  //调用Juqery Ajax
      type: "POST",
      url: data_url,
      data:formdata, //整个表单的数据
      timeout: 1500,
      error: function(msgs){
          $('#msgs').html("<img src=\"images/error.gif\" /><span class=\"about_content_title\">出错，请重新提交！</span>");
          $(":input") .attr('disabled', false);
      },//error
      success: function(msgs1){
           $('#msgs').html("<img src=\"images/ok.gif\" /><span class=\"about_content_title\">"+msgs1+"</span>");
           $(":input") .attr('disabled', false);
      }//succesful
});//end ajax
 }

</script>>
</HEAD>
<BODY topMargin=10>
<TABLE cellSpacing=6 cellPadding=2 width="100%" border=0>
  <TBODY>
  <TR>
    <TD>
      <TABLE class=guide cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD><A href="<?php echo site_url("admin/info"); ?>" target="main">系统首页</A>&nbsp;» 调单归档</TD>
        </TR></TBODY></TABLE>
      <BR>
       <FORM id="myform" name="myform" method="post">
        <table class="tableborder" width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr class="header">
          <td colspan="2">调单归档</td>
        </tr>
        <tr>
          <td width="100" class="altbg1">调单号：            </td>
           <input type="hidden" name="id" id="id" value="<?if(isset($req)){echo $req["id"];}else {echo "NULL";} ?>"><!--id-->
          <td class="altbg1"><b><? if(isset($req)){echo $req["Requisition_ID"];}?></b> &nbsp;<a href="<?if(isset($req)){echo site_url("main/download"."/".$req["id"]);}?>"  target=""  ><img src="images/zip.gif" width="16" height="16"  border="0" alt="下载调单文件"/></a>
          </td>
        </tr>
        <tr>
          <td class="altbg1">调单状态：            </td>
          <td class="altbg1"> <div style="margin-top:5px;margin-bottom:5px;font-size:12px;color: #C62E25;font-weight:bold;"><? if( $req["state"]==3){ echo"己归档。";}else{echo"待归档。";}?></div></td>
        </tr>
        <tr>
            <td class="altbg1">归档说明：       </td>
          <td class="altbg1">
          <textarea name="text" cols="102" rows="5" id="text">全部电路己经调度完成，分公司己经反馈。</textarea>
          </td>
        </tr>
        <tr>
          <td class="altbg1"> </td>
          <td class="altbg1">
          <? if( $req["state"]==2){?>
           <input class="submit" type="button" value="归 档" name=s1 id="s1" onClick="save()">&nbsp;&nbsp;&nbsp;&nbsp;
            <?}?>  
          </td>
        </tr>
        <tr>
          <td></td>
          <td > 
          <div id="msgs" style="margin-top:12px;margin-bottom:5px;font-size:13px;color: #C62E25;font-weight:bold;"></div>
          </td>
       </tr>
      </table>
      </FORM></TD></TR></TBODY></TABLE><BR><BR>
      <br/><br/>
      <DIV class=footer>
        <HR width="80%" color=#9db3c5 noShade SIZE=0>
         Powered by <? echo $copyright ?><em>,</em> <B><A style="COLOR: #666" href="<? echo base_url() ?>" target="_blank"><? echo $version;?>.</A></B>
      </DIV>
</BODY></HTML>
